package com.ssyc.gsk_teacher.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.ssyc.common.adapter.CommonAdapter;
import com.ssyc.common.adapter.ViewHolder;
import com.ssyc.gsk_teacher.R;
import com.ssyc.gsk_teacher.bean.UnitBean;

import java.util.List;


/**
 * 教师端--展示单元下所有课程的列表适配器
 * Created by Administrator on 2018/1/22 0022.
 */

public class TeacherGvLessonAdapter extends CommonAdapter<UnitBean.DataBean.GradeListBean> {

    public TeacherGvLessonAdapter(Context context, List<UnitBean.DataBean.GradeListBean> datas, int layoutId) {
        super(context, datas, layoutId);
    }

    @Override
    public void convert(ViewHolder holder, UnitBean.DataBean.GradeListBean lessonInfo) {

        //课程名称
        TextView tvChildren = holder.getView(R.id.tv_children);

        tvChildren.setText("Lesson" + lessonInfo.getLesson_id());
        //课程的标记信息
        TextView tvNum = holder.getView(R.id.tv_lesson_num);
        tvNum.setVisibility(View.GONE);
    }
}
